from recruit.models import Recruit
from recruit.serializers.recruits_serializer import RecruitSimpleSerializer
from rest_framework.generics import ListAPIView

class RecommendView(ListAPIView):
    """推荐职位列表 接口"""
    queryset = Recruit.objects.filter(state=1).order_by('-visits')[:4]
    serializer_class = RecruitSimpleSerializer

class LatestRecruitView(ListAPIView):
    """最新职位列表 接口"""
    queryset = Recruit.objects.filter(state=1).order_by('-createtime')[:4]
    serializer_class = RecruitSimpleSerializer